package com.tebiecloud.autoconfigure;

import com.tebiecloud.common.constants.QueueConstants;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 队列配置，direct模式，直接根据队列名称投递消息
 * @Author: tebie
 * @Date: 2019-08-04 09:27
 */
@Configuration
public class MqAutoConfiguration {

    /**
     * api资源扫描
     * @return
     */
    @Bean
    public Queue apiResourceQueue() {
        return new Queue(QueueConstants.QUEUE_SCAN_API_RESOURCE);
    }

    /**
     * 日志
     * @return
     */
    @Bean
    public Queue accessLogsQueue() {
        return new Queue(QueueConstants.QUEUE_ACCESS_LOGS);
    }

}
